package com.leyou.user.service;

import com.leyou.user.entity.HisImgs;
import com.leyou.user.mapper.HisImageMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import tk.mybatis.mapper.entity.Example;

import java.util.List;

@Service
@Transactional
public class HisImgsService {
    @Autowired
    HisImageMapper hisImageMapper;

    public  List<HisImgs> loadHisImages(Long userId) {

        Example example = new Example(HisImgs.class);
        example.createCriteria().andEqualTo("userId",userId);
        List<HisImgs> hisImgsList = hisImageMapper.selectByExample(example);
        return hisImgsList;
    }
}
